﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class modules_search : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void buildQueryString() {

        string query = "~/search.aspx?";
        if (rb_kontorer.Checked) query += "catid=12";
        if (rb_lager_produktion.Checked) query += "catid=8";
        if (rb_butikker.Checked) query += "catid=9";
        if (rb_bolig.Checked) query += "catid=10";
        if (rb_landbrug.Checked) query += "catid=14";
        if (rb_grunde.Checked) query += "catid=11";
        if (rb_investering.Checked) query += "catid=13";
        if (rb_alle.Checked) query += "catid=0";
        query += "&postnumber=" + tb_searchkey.Text; 
        Response.Redirect(query);
    }
    protected void submitQuery(object sender, EventArgs e) {
        buildQueryString();
    }
}
